package 题目集.二分;

import java.util.Scanner;

//https://vjudge.net.cn/contest/612024#problem/B
public class ch03_电缆主站 {
    static int n,m;
    static long[] arr;
    static long max=0;
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        n=sc.nextInt();
        m=sc.nextInt();
        arr=new long[n];
        for (int i = 0; i < n; i++) {
            arr[i]= (long) (sc.nextDouble()*100);
            max+=arr[i];
        }
        max=max/m;
        System.out.println(String.format("%.2f",fun()/100.0));

    }
    public static long fun(){
        long l=0,r=max;
        while (l<=r){
            long mid=l+r>>1;
            if (check(mid)){
                l=mid+1;
            }else {
                r=mid-1;
            }
        }
        if (check(l)){
            return l;
        }
        return r;
    }

    /**
     * 每段长度为len是否可以被切成m段
     */
    private static boolean check(double len) {
        long res=0;
        for (double l : arr) {
            res+=l/len;
        }
        return res>=m;
    }
}
